﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Petroleum.DB;
using Petroleum.DB.Model;

namespace Petroleum.UC.Public
{
    public partial class Step6_Button : UserControl, HZH_Controls.Controls.IDataGridViewCustomCell
    {
        private Casing m_object = null;
        
        public Step6_Button()
        {
            InitializeComponent();
        }

        public void SetBindSource(object obj)
        {
            if (obj is Casing)
                m_object = (Casing)obj;
        }


        private void ucBtnExt1_BtnClick(object sender, EventArgs e)
        {
            if (m_object != null)
            {
                HZH_Controls.Forms.FrmTips.ShowTipsSuccess(this.FindForm(), "BHA集合：" + m_object.BHAList.Count);
            }
        }

        private void ucBtnExt2_BtnClick(object sender, EventArgs e)
        {
            if (m_object != null)
            {
                HZH_Controls.Forms.FrmTips.ShowTipsSuccess(this.FindForm(), "DP集合：" + m_object.DrillingParametersList.Count);
            }
        }
    }
}
